This invention relates to engine controllers for controlling an amount of fuel injection, ignition timing, etc. in accordance with the condition of the engine, and particularly to an engine controller using a microcomputer for executing interrupt processes.
The conventional engine controller employs a microcomputer to control the amount of fuel supply, ignition timing, ignition start timing, and so on. For example, a fuel injection controller for controlling the amount of fuel supply to the gasoline engine determines the amount of fuel supply to the engine by adding to the reference values of the rotational speed of the engine and the absolute pressure within the inlet pipe, the factors indicative of the operation conditions of the engine, for example, the constants and/or coefficients according to the rotational speed of the engine, the absolute pressure within the inlet pipe, the coolant temperature of the engine, the degree of opening of the throttle valve, the concentration of exhaust gas (concentration of oxygen) and so on, and/or by multiplying the reference values by those constants and/or the coefficients, and then controls the time in which the injector opens the valve, on the basis of the determined amount of fuel supply.
In the conventional fuel injection controller using a microcomputer, the constants and coefficients according to the coolant temperature of the engine and so on are determined by the background process, and the computation of the reference values of the amount of fuel supply, the addition of the constants and coefficients to the reference values and the multiplication therebetween are performed by the TDC interrupt. In addition, the setting of the fuel supply amount data determined by the above computation in the counter and the fuel injection timing are executed by a higher-order interrupt (for example, in a six-cylinder engine, the interrupt is synchronized with a signal generated at every 30 degrees of crank angle).
FIGS. 4A, 4B and 4C show the frequencies of the execution of interrupt processes and other processes (background process and so on) by the engine controller. That is, as the frequency of execution of interrupt processes increases, the time of execution of other processes decreases to an extent so as not to satisfy the condition of a predetermined "minimum execution time of other processes per unit time" (FIG. 4C).
Further, in FIG. 4A, T shows a length of the execution time of other processes which should be executed within 100 ms, for example. FIGS. 4A and 4B show respective cases where the execution time length T of the other processes is distributed within 100 ms. However, FIG. 4C shows a case where the execution time length T of the other processes is distributed exceeding 100 ms due to the high interrupt frequency.
Thus, in the conventional engine controller, some of the interrupt processes are omitted so as to meet both conditions of "the minimum execution time of interrupt processes per unit time" and "the minimum execution time of other processes per unit time". For example, the frequency of interrupt processes is calculated from the measured value of the interrupt period by using a timer or the like, and the frequency of the omission is increased with an increase in the interrupt frequency.
FIGS. 5A, 5B and 5C and FIG. 6 are diagrams showing that the frequency of the omission is increased with an increase in the interrupt frequency. In this example, the execution frequency is reduced step by step, such as by 1/2 and 1/4, as the interrupt frequency is increased at every predetermined incremental value.
Moreover, it is known that as shown in FIG. 6, a hysteresis characteristic is provided to stabilize the the execution frequency in the regions where the relationship between the execution frequency and the interrupt frequency is changed.
The conventional engine controller, however, has a drawback in that, since the execution frequency is determined by the start period of interrupt processes, without considering whether the execution time of other processes is assured to exceed a specified value actually, it is necessary to change the setting of the regions, for example, where the frequency of start of interrupt processes are changed stepwise, when the contents of interrupt processes are changed to increase their execution time, but the execution time of other processes is not assured.